package Java100_1006;

import Java100_1006.operations.*;

import java.util.Scanner;

//管理员
public class Admin extends User{
    //管理员的构造方法
    public Admin(){
        //初始化operation
        this.operations = new IOperation[]{
                new ExitOperation(),
                new DisplayOperation(),
                new FindOperation(),
                new AddOperation(),
                new DeleteOperation()
        };
    }
    //打印管理员的菜单
    @Override
    public int menu() {
        System.out.println("================================");
        System.out.println("欢迎您, " + this.getUserName() + "! 您是管理员! ");
        System.out.println("1. 查看书籍列表");
        System.out.println("2. 查找指定书籍");
        System.out.println("3. 新增书籍");
        System.out.println("4. 删除书籍");
        System.out.println("0. 退出系统");
        System.out.println("================================");
        System.out.println("请输入选项: ");
        Scanner scanner = new Scanner(System.in);
        int choice = scanner.nextInt();
        return choice;
    }
}
